package com.aaa.reflect;

import java.lang.reflect.Constructor;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2022/8/18 11:08
 * @description：
 * @modified By：
 * @version:
 */
public class ConstructorTest {
    public static void main(String[] args) throws Exception {
        Class<Person> clazz = Person.class;
        Constructor<Person> constructor = clazz.getConstructor(int.class);
        //执行构造器，=====  new
        Person person = constructor.newInstance(123);
        System.out.println(person.toString());
    }
}
